cScoreboard = {}
cScoreboard.Logo = nil
cScoreboard.Font = nil

function cScoreboard:Init()
	self.Logo = ""
	self.Font = "Default"
end

function cScoreboard:SetLogo(logo)
	self.Logo = logo
end
function cScoreboard:GetLogo()
	return self.Logo
end
function cScoreboard:SetFont(font)
	self.Font = font
end
function cScoreboard:GetFont()
	return self.Font
end

function cScoreboard:Paint()
	local x = self:GetWide()
	local y = self:GetTall()
	local texture = surface.GetTextureID(self:GetLogo())
	draw.RoundedBox(6,80,120,x-160,y-120,Color(50,50,50,200))
	draw.RoundedBox(6,96,136,x-192,y-152,Color(200,200,200,200))
	surface.SetDrawColor(255,255,255,255)
	surface.SetTexture(texture)
	surface.DrawTexturedRect(0,0,128,128)
	surface.SetFont(self:GetFont())
	local _,liney = surface.GetTextSize("H")
	surface.SetDrawColor(50,50,50,255)
	surface.DrawLine(96,liney+136,x-96,liney+136)
	surface.SetTextColor(50,50,50,255)
	local ypos = 136
	surface.SetTextPos(101,136)
	surface.DrawText("Player")
	local boxx = x-192
	local boxy = y-152
	surface.SetTextPos(101+(boxx/4),136)
	surface.DrawText("Money")
	surface.SetTextPos(101+(boxx/2),136)
	surface.DrawText("Kills")
	surface.SetTextPos(101+(boxx/1.333333333333),136)
	surface.DrawText("Ping")
	for k,v in pairs(player.GetAll()) do
		ypos = ypos+liney
		surface.SetTextPos(101,ypos)
		surface.DrawText(v:Nick())
		surface.SetTextPos(101+(boxx/4),ypos)
		surface.DrawText(1)
		surface.SetTextPos(101+(boxx/2),ypos)
		surface.DrawText(v:Frags())
		surface.SetTextPos(101+(boxx/1.33333333333),ypos)
		--print((boxx/4))
		surface.DrawText(v:Ping())
	end
	
end
vgui.Register("cScoreboard",cScoreboard,"Panel")